OBJECTS = cgihandler.o dictionary.o happyballot.o
LFLAG = -lmysqlclient

all : result ballot information
.PHONY : all

result : result.o $(OBJECTS)
	g++ -o result result.o $(OBJECTS) $(LFLAG)

ballot : ballot.o $(OBJECTS)
	g++ -o ballot ballot.o $(OBJECTS) $(LFLAG)

information : information.o cgihandler.o dictionary.o
	g++ -o information information.o cgihandler.o dictionary.o

information.o : cgihandler.h dictionary.h
cgihandler.o : cgihandler.h dictionary.h
dictionary.o : dictionary.h
happyballot.o : dictionary.h cgihandler.h happyballot.h
ballot.o : dictionary.h cgihandler.h happyballot.h
result.o : dictionary.h cgihandler.h happyballot.h

.PHONY : clean
clean :
	-rm information.o result.o ballot.o information result ballot $(OBJECTS)
